package command

import (
	"context"

	v1 "code.byted.org/bytertc/whiteboard_server/biz/api/pb/v1"
	"google.golang.org/protobuf/proto"
)

type Command interface {
	Execute(ctx context.Context) []Result
}

type Result interface {
	Command() v1.Command
	Broadcast() bool        // 是广播还是单播
	Message() proto.Message // 给客户端的回应，必须要有
	Err() error             // 用于打印日志
}
